<!DOCTYPE html>
<#assign dicSelect = JspTaglibs["http://www.casic304.cn/dicSelect"]/>
<#assign secSelect = JspTaglibs["http://www.casic304.cn/secSelect"] />
<#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />

<html>
<head>
    <meta charset="utf-8">
    <title>报告模板管理基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <!--<link rel="stylesheet" href="${ctx}/qbdmsStatic/style/forms/currencyCss.css">-->
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
</head>

<body class="listBody qbdms-particulars">
<div class="qbdms-bodyDiv">
    <div class="layui-table-view-body qbdms-add-view-body">
        <#if isClose != 'true'><div class="qbdms-formTitle">报告模板信息 <i class="qbdms-returnOn closeWindow">返回</i></div></#if>
        <form class="formPreview layui-form" requrl="${ctx}/qbdms/wQbdReportTemplate/get" lay-filter="wQbdReportTemplateDataForm">
            <div class="" style="width: 100%;overflow-x: auto">
                <table class="tableExcel qbdms-zeroTable" width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tbody>
                        <tr id="tbxx">
                        <tr>
                            <td class="qbdms-zeroTable-lable">模板名称<span style="color: red;">*</span></td>
                            <td name="name"></td>
                            <td class="qbdms-zeroTable-lable">密级<span style="color: red;">*</span></td>
                            <td ><@secSelect.sec_select data_src=1 required=true  name="secret"/></td>
                            <td class="qbdms-zeroTable-lable">型号质量问题统计<span style="color: red;">*</span></td>
                            <td ><@dicSelect.dic name="qualityProblem" verify="required" css="layui-input
                                filter-value"  nodeKey="ndtj" /></td>
                        </tr>

                        <tr>
                            <td class="qbdms-zeroTable-lable">型号质量问题开始时间<span style="color: red;">*</span></td>
                            <td id="qualityProblemStart"></td>
                            <td class="qbdms-zeroTable-lable">型号质量问题结束时间<span style="color: red;">*</span></td>
                            <td id="qualityProblemEnd"></td>
                            <td class="qbdms-zeroTable-lable">院前五位质量问题统计<span style="color: red;">*</span></td>
                            <td ><@dicSelect.dic name="qualityProblemTopFive" verify="required"
                                css="layui-input filter-value"  nodeKey="ndtj"/></td>
                        </tr>

                        <tr>
                            <td class="qbdms-zeroTable-lable">院前五位质量问题统计开始时间<span style="color: red;">*</span></td>
                            <td id="qualityProblemTopFiveStart"></td>
                            <td class="qbdms-zeroTable-lable">院前五位质量问题统计结束时间<span style="color: red;">*</span></td>
                            <td id="qualityProblemTopFiveEnd"></td>
                            <td class="qbdms-zeroTable-lable">靶场零故障统计<span style="color: red;">*</span></td>
                            <td ><@dicSelect.dic name="zeroFailShootingRange" verify="required"
                                css="layui-input filter-value"  nodeKey="ndydtj" /></td>
                        </tr>

                        <tr>
                            <td class="qbdms-zeroTable-lable">靶场零故障统计开始时间<span style="color: red;">*</span></td>
                            <td id="zeroFailShootingRangeStart"></td>
                            <td class="qbdms-zeroTable-lable">靶场零故障统计结束时间<span style="color: red;">*</span></td>
                            <td id="zeroFailShootingRangeEnd"></td>
                            <td class="qbdms-zeroTable-lable">军贸质量问题统计<span style="color: red;">*</span></td>
                            <td ><@dicSelect.dic name="militaryTradeQuality" verify="required"
                                css="layui-input filter-value"  nodeKey="ndydtj" /></td>
                        </tr>

                        <tr>
                            <td class="qbdms-zeroTable-lable">军贸质量问题统计开始时间<span style="color: red;">*</span></td>
                            <td id="militaryTradeQualityStart"></td>
                            <td class="qbdms-zeroTable-lable">军贸质量问题统计结束时间<span style="color: red;">*</span></td>
                            <td id="militaryTradeQualityEnd"></td>
                            <td class="qbdms-zeroTable-lable">售后质量问题统计<span style="color: red;">*</span></td>
                            <td ><@dicSelect.dic name="afterSalesQuality" verify="required"
                                css="layui-input filter-value"  nodeKey="ndydtj" /></td>
                        </tr>

                        <tr>
                            <td class="qbdms-zeroTable-lable">售后质量问题统计开始时间<span style="color: red;">*</span></td>
                            <td id="afterSalesQualityStart"></td>
                            <td class="qbdms-zeroTable-lable">售后质量问题统计结束时间<span style="color: red;">*</span></td>
                            <td colspan="3" id="afterSalesQualityEnd"></td>

                        </tr>

                        <#if isClose != 'true'>
                        <div class="layui-form-item btnformItem">
                            <p>
                                <button type="reset" id="closeWindow" class="layui-btn layui-btn-sm btn-save qbdms-oneBtnLine">返回</button>
                            </p>
                        </div>
                        </#if>

                    </tbody>
                </table>
            </div>
        </form>
    </div>
</div>

<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>

<script>
    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','common','laydate','layer','jquery','setter','propsHandle','qbdmsForm'], function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var common = layui.common;
        var form = layui.qbdmsForm;
        var propsHandle = layui.propsHandle;

        var  defProps = {
                //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
                viewMould: 'moulds/', // 组件模块 存放文件 *****
                formAreaInfo: '.formPreview',
                formAreaInfo: 'html',
                temDate: '.temDate',
                uploadFileBtn: '.uploadFileBtn',
                uploadImgBtn: '.uploadImgBtn',
                richTextArea: '.richTextArea',
                selectInput: '.selectInput',
                radioOptionCont: '.radioOptionCont',
                dataLexiTree: '.dataLexiTree',
                selectorBtn: '.selectorBtn'
            },
            temQuery = new propsHandle();  // 实例化模板功能部分

        // 初始化模板功能
        temQuery.initTem({
            selectorBtn: defProps.selectorBtn,
            selectorTemPath: setter.views + defProps.viewMould
        });

        //关闭当前页面
        $("#closeWindow,.closeWindow").click(function () {
            window.location.href =  '${ctx}/qbdms/wQbdReportTemplate/view/list';
        });


        var runId = "${runId}";
        if (runId == null || runId == '') {
            $("#hideAndShow").show();
        }

        common.updateForm({
            name: 'wQbdReportTemplateDataForm',
            idValue: "${id}",
            primary: "id",getCallback: function(data) {
                $("#tbxx").html("<td class='qbdms-zeroTable-lable'>填报信息:</td><td colspan='5' class=''>【" + data.data.filldept + " | " + data.data.fillman + " | " + data.data.filldate + "】</td>");

               $("#qualityProblemStart").text(data.data.qualityProblemStart.substring(0,4));
               $("#qualityProblemEnd").text(data.data.qualityProblemEnd.substring(0,4));
               $("#qualityProblemTopFiveStart").text(data.data.qualityProblemTopFiveStart.substring(0,4));
               $("#qualityProblemTopFiveEnd").text(data.data.qualityProblemTopFiveEnd.substring(0,4));
                if(data.data.zeroFailShootingRange=="aydtj"){
                    $("#zeroFailShootingRangeStart").text(data.data.zeroFailShootingRangeStart.substring(0,7));
                    $("#zeroFailShootingRangeEnd").text(data.data.zeroFailShootingRangeEnd.substring(0,7));
                }else{
                    $("#zeroFailShootingRangeStart").text(data.data.zeroFailShootingRangeStart.substring(0,4));
                    $("#zeroFailShootingRangeEnd").text(data.data.zeroFailShootingRangeEnd.substring(0,4));
                }
                if(data.data.militaryTradeQuality=="aydtj"){
                    $("#militaryTradeQualityStart").text(data.data.militaryTradeQualityStart.substring(0,7));
                    $("#militaryTradeQualityEnd").text(data.data.militaryTradeQualityEnd.substring(0,7));
                }else{
                    $("#militaryTradeQualityStart").text(data.data.militaryTradeQualityStart.substring(0,4));
                    $("#militaryTradeQualityEnd").text(data.data.militaryTradeQualityEnd.substring(0,4));
                }
                if(data.data.afterSalesQuality=="aydtj"){
                    $("#afterSalesQualityStart").text(data.data.afterSalesQualityStart.substring(0,7));
                    $("#afterSalesQualityEnd").text(data.data.afterSalesQualityEnd.substring(0,7));
                }else{
                    $("#afterSalesQualityStart").text(data.data.afterSalesQualityStart.substring(0,4));
                    $("#afterSalesQualityEnd").text(data.data.afterSalesQualityEnd.substring(0,4));
                }

            }
        });
        $("body *").not("#closeWindow").attr("disabled","disabled");
    });
</script>
</body>
</html>